package gui.applets;

import java.applet.Applet;
import java.awt.Button;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class AppletButton extends Applet{

	Button btn1=new Button("Button 1");
	Button btn2=new Button("Button 2");
	
	public void init(){
		this.btn1.addActionListener(new Btn1());
		this.btn2.addActionListener(new Btn2());
		this.add(this.btn1);
		this.add(this.btn2);
	}
	
	class Btn1 implements ActionListener{

		@Override
		public void actionPerformed(ActionEvent e) {
			getAppletContext().showStatus("Button 1");			
		}
		
	}
	class Btn2 implements ActionListener{

		@Override
		public void actionPerformed(ActionEvent e) {
			getAppletContext().showStatus("Button 2");			
		}
		
	}
}
